package com.yuw.homework06;

public class EnglishStudent extends Student {

    private Double speechScore = 0.0;

    // 行为

    public EnglishStudent() {
    }

    public EnglishStudent(String stuName, String stuSex, Integer stuAge, String stuNum, Double stuMiddleScore, Double stuLastScore, Double speechScore) {
        super(stuName, stuSex, stuAge, stuNum, stuMiddleScore, stuLastScore);
        this.speechScore = speechScore;
    }

    public Double getSpeechScore() {
        return speechScore;
    }

    public void setSpeechScore(Double speechScore) {
        this.speechScore = speechScore;
    }

    @Override
    public double caculateScore() {
        // 综合成绩
        return this.speechScore * 0.5 + this.getStuMiddleScore() * 0.25
                + this.getStuLastScore() * 0.25;
    }
}
